<ul id="widgets">

<?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar() ) : else : ?>

	<li class="widget widget_search">
		<?php include (TEMPLATEPATH . '/searchform.php'); ?>
	</li>

	<li class="widget widget_categories">
		<h2>Categories</h2>
		<ul>
			<?php
			$category = get_the_category();
			wp_list_categories('sort_column=name&title_li=&current_category='.$category[0]->cat_ID);
			?>
		</ul>
	</li>
		
	<li class="widget widget_archive">
		<h2>Archives</h2>
		<ul>
			<?php wp_get_archives('type=monthly'); ?>
		</ul>
	</li>
	
	<li class="widget widget_links">
		<h2>Blogroll</h2>
		<ul>
			<?php get_links(-1, '<li>', '</li>', ' - '); ?>
		</ul>
	</li>

<?php endif; ?>

	<li class="widget widget_footer"></li>
</ul><!-- /widgets -->